<template>
  <Information :userInfo= user></Information>
  <Order more="1"/>
  <GCollection more="1"/>
  <SCollection more="1"/>
</template>

<script>
// 引入用户信息
import { getUserInfo } from '@/api/user.js'
import { ref } from '@vue/reactivity'
import { useStore } from 'vuex'
// 注册组件
  import Information from "@/views/member/components/Information";
  import Order from "@/views/member/components/Order";
  import GCollection from "@/views/member/components/GCollection";
  import SCollection from "@/views/member/components/SCollection";
  export default {
    name: "Index",
    components: {SCollection, Order, Information, GCollection},
    setup() {
       // 用户信息
      let user = ref({})
      let store = useStore()
      function getuser(){
        getUserInfo(store.state.id).then(res =>{
        user.value = res.data.data
      })
      }
      getuser()
      return{
        user
      }
    }
  }
</script>

<style scoped>

</style>